(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
low(0, cons(m, x)) →+ low(0, x)
gives rise to a decreasing loop by considering the right hand sides subterm at position [].
The pumping substitution is [x / cons(m, x)].
The result substitution is [ ].

(2) BOUNDS(n^1, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

S is empty.
Rewrite Strategy: FULL

(5) SlicingProof (LOWER BOUND(ID) transformation)

Sliced the following arguments:
app/0
app/1

(6) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

S is empty.
Rewrite Strategy: FULL

(7) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(8) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

(9) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
ge, averIter, plus, low, high, quicksort

They will be analysed ascendingly in the following order:
ge < averIter
ge < low
ge < high
plus < averIter
low < quicksort
high < quicksort

(10) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

Generator Equations:
gen_0':s:nil:cons:app:error4_0(0) ⇔ 0'
gen_0':s:nil:cons:app:error4_0(+(x, 1)) ⇔ s(gen_0':s:nil:cons:app:error4_0(x))

The following defined symbols remain to be analysed:
ge, averIter, plus, low, high, quicksort

They will be analysed ascendingly in the following order:
ge < averIter
ge < low
ge < high
plus < averIter
low < quicksort
high < quicksort

(11) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)

Induction Base:
ge(gen_0':s:nil:cons:app:error4_0(0), gen_0':s:nil:cons:app:error4_0(0)) →RΩ(1)
true

Induction Step:
ge(gen_0':s:nil:cons:app:error4_0(+(n6_0, 1)), gen_0':s:nil:cons:app:error4_0(+(n6_0, 1))) →RΩ(1)
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) →IH
true

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(12) Complex Obligation (BEST)

(13) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

Lemmas:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':s:nil:cons:app:error4_0(0) ⇔ 0'
gen_0':s:nil:cons:app:error4_0(+(x, 1)) ⇔ s(gen_0':s:nil:cons:app:error4_0(x))

The following defined symbols remain to be analysed:
plus, averIter, low, high, quicksort

They will be analysed ascendingly in the following order:
plus < averIter
low < quicksort
high < quicksort

(14) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
plus(gen_0':s:nil:cons:app:error4_0(n409_0), gen_0':s:nil:cons:app:error4_0(b)) → gen_0':s:nil:cons:app:error4_0(+(n409_0, b)), rt ∈ Ω(1 + n4090)

Induction Base:
plus(gen_0':s:nil:cons:app:error4_0(0), gen_0':s:nil:cons:app:error4_0(b)) →RΩ(1)
gen_0':s:nil:cons:app:error4_0(b)

Induction Step:
plus(gen_0':s:nil:cons:app:error4_0(+(n409_0, 1)), gen_0':s:nil:cons:app:error4_0(b)) →RΩ(1)
s(plus(gen_0':s:nil:cons:app:error4_0(n409_0), gen_0':s:nil:cons:app:error4_0(b))) →IH
s(gen_0':s:nil:cons:app:error4_0(+(b, c410_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(15) Complex Obligation (BEST)

(16) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

Lemmas:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s:nil:cons:app:error4_0(n409_0), gen_0':s:nil:cons:app:error4_0(b)) → gen_0':s:nil:cons:app:error4_0(+(n409_0, b)), rt ∈ Ω(1 + n4090)

Generator Equations:
gen_0':s:nil:cons:app:error4_0(0) ⇔ 0'
gen_0':s:nil:cons:app:error4_0(+(x, 1)) ⇔ s(gen_0':s:nil:cons:app:error4_0(x))

The following defined symbols remain to be analysed:
averIter, low, high, quicksort

They will be analysed ascendingly in the following order:
low < quicksort
high < quicksort

(17) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol averIter.

(18) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

Lemmas:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s:nil:cons:app:error4_0(n409_0), gen_0':s:nil:cons:app:error4_0(b)) → gen_0':s:nil:cons:app:error4_0(+(n409_0, b)), rt ∈ Ω(1 + n4090)

Generator Equations:
gen_0':s:nil:cons:app:error4_0(0) ⇔ 0'
gen_0':s:nil:cons:app:error4_0(+(x, 1)) ⇔ s(gen_0':s:nil:cons:app:error4_0(x))

The following defined symbols remain to be analysed:
low, high, quicksort

They will be analysed ascendingly in the following order:
low < quicksort
high < quicksort

(19) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol low.

(20) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

Lemmas:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s:nil:cons:app:error4_0(n409_0), gen_0':s:nil:cons:app:error4_0(b)) → gen_0':s:nil:cons:app:error4_0(+(n409_0, b)), rt ∈ Ω(1 + n4090)

Generator Equations:
gen_0':s:nil:cons:app:error4_0(0) ⇔ 0'
gen_0':s:nil:cons:app:error4_0(+(x, 1)) ⇔ s(gen_0':s:nil:cons:app:error4_0(x))

The following defined symbols remain to be analysed:
high, quicksort

They will be analysed ascendingly in the following order:
high < quicksort

(21) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol high.

(22) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

Lemmas:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s:nil:cons:app:error4_0(n409_0), gen_0':s:nil:cons:app:error4_0(b)) → gen_0':s:nil:cons:app:error4_0(+(n409_0, b)), rt ∈ Ω(1 + n4090)

Generator Equations:
gen_0':s:nil:cons:app:error4_0(0) ⇔ 0'
gen_0':s:nil:cons:app:error4_0(+(x, 1)) ⇔ s(gen_0':s:nil:cons:app:error4_0(x))

The following defined symbols remain to be analysed:
quicksort

(23) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol quicksort.

(24) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

Lemmas:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s:nil:cons:app:error4_0(n409_0), gen_0':s:nil:cons:app:error4_0(b)) → gen_0':s:nil:cons:app:error4_0(+(n409_0, b)), rt ∈ Ω(1 + n4090)

Generator Equations:
gen_0':s:nil:cons:app:error4_0(0) ⇔ 0'
gen_0':s:nil:cons:app:error4_0(+(x, 1)) ⇔ s(gen_0':s:nil:cons:app:error4_0(x))

No more defined symbols left to analyse.

(25) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)

(26) BOUNDS(n^1, INF)

(27) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

Lemmas:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s:nil:cons:app:error4_0(n409_0), gen_0':s:nil:cons:app:error4_0(b)) → gen_0':s:nil:cons:app:error4_0(+(n409_0, b)), rt ∈ Ω(1 + n4090)

Generator Equations:
gen_0':s:nil:cons:app:error4_0(0) ⇔ 0'
gen_0':s:nil:cons:app:error4_0(+(x, 1)) ⇔ s(gen_0':s:nil:cons:app:error4_0(x))

No more defined symbols left to analyse.

(28) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)

(29) BOUNDS(n^1, INF)

(30) Obligation:

TRS:
Rules:
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0')))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app)
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Types:
average :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ge :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → true:false
true :: true:false
averIter :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
false :: true:false
ifIter :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
plus :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
s :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
0' :: 0':s:nil:cons:app:error
append :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
nil :: 0':s:nil:cons:app:error
cons :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
app :: 0':s:nil:cons:app:error
low :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_low :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
high :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
if_high :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
quicksort :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
ifquick :: true:false → 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
isempty :: 0':s:nil:cons:app:error → true:false
head :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
tail :: 0':s:nil:cons:app:error → 0':s:nil:cons:app:error
error :: 0':s:nil:cons:app:error
a :: b:c
b :: b:c
c :: b:c
hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s:nil:cons:app:error4_0 :: Nat → 0':s:nil:cons:app:error

Lemmas:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':s:nil:cons:app:error4_0(0) ⇔ 0'
gen_0':s:nil:cons:app:error4_0(+(x, 1)) ⇔ s(gen_0':s:nil:cons:app:error4_0(x))

No more defined symbols left to analyse.

(31) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) → true, rt ∈ Ω(1 + n60)

(32) BOUNDS(n^1, INF)